home *** CD-ROM | disk | FTP | other *** search
Wrap
/* SkipScreen * Skips unnecessary pages on sites like Rapidshare, Megaupload, zShare, and Mediafire. * No more endless clicking to get the files you want. What a relief! */ // for JsLint -- see http://www.jslint.com/lint.html /*global GM_getValue GM_log unsafeWindow XPathResult */ // @name SkipScreen // @namespace http://www.SkipScreen.com // @author Worcester LLC (for the purposes of copyright) // @developer Michael Paulukonis // @license see ../license.txt // start is at the end.... /* ******************************************* utility functions ******************************************* */ // aaargh! eval is evil! // but this is working, for now... //eval(jQuery); //eval(jDNR); // http://dev.iceburg.net/jquery/jqDnR/ // Drag-n-Resize for jQuery // declare globals var TOOLS; // instantiated as globals TOOLS function SKIPSCREEN_TOOLS() { this.ONE_SECOND = 1000; this.minutesToSeconds = function (mins) { return mins * 60; }; // returns a time-string like mm:ss this.formatSeconds = function (secs) { return parseInt(secs/60,10) + ":" + (secs%60 > 9 ? secs%60 : "0" + secs%60); }; // note +- the offset, +- half the offset // ie, the offset is the range this.randomOffset = function (range) { return ( -(range/2) + Math.floor(Math.random() * (range+1))); }; this.getSkipCount = function () { return GM_getValue('skipcount'); }; this.incrSkipCount = function () { var curr = this.getSkipCount(); curr++; GM_setValue('skipcount', curr); }; } // straight-up interface, no defaults function enabled(prefName) { return GM_getValue(prefName); } function disabled (prefName) { // uses the GM-compiler's built-in function, with a redefined root var dfault = false; // this means if a pref does not exist, it's the same as disabled -- SO BUILD PREFS! // three-bangs = negated flag (it's a negative function name for a positive preference) var checker = GM_getValue(prefName+'active', dfault); return !!!checker; } // return Name, or mask that we use as a preference, if server is known by an alias function getMask(prefName) { var mask = prefName; // all the various servers that operate for linkbucks var linkbucksreg = /linkbucks|baberepublic|blahetc|linkgalleries|linkseer|picturesetc|placepictures|qvvo|realfiles|seriousfiles|seriousurls|thatsprime|thesefiles|thesegalleries|thosegalleries|tinybucks|uberpicz|ubervidz|ubucks|ugalleries|urlpulse|viraldatabase|youfap|zxxo/i; if (linkbucksreg.exec(prefName)) { mask = "linkbucks"; } else if (prefName == '4shared') { mask = 'fourshared'; } else if (prefName.match('mega(upload|porn)')) { mask = 'megaupload'; } return mask; } // wrapper function, for future expansion function logIt(message) { GM_log(message); } function pathSplit(path) { return path.split('/'); } function stripLocation(url) { // ditch the protocol (eg, "http://" "https://" "gopher://") // and the path (eg "http://sub.domain.tld/this/is/the/path.mp3") // leaving only "sub.domain.tld" (in this case) // equiv. to location.hostname BUT we use this on arbitrary paths (eg, sharebee) var idx = url.indexOf("://")+3; var Domain = url.substring(idx); idx = Domain.indexOf("/"); Domain = Domain.substring(0, idx); return Domain; } // given a valid URL, return the hostname as an array // http://jim.dandy.org/path/to/something.zip -> ['jim','dandy','org'] function domainToArray (url) { var sDomain = stripLocation(url); var aDomain = []; aDomain = sDomain.split('.'); return aDomain; } // return the second-level domain name // expects an array derived from splitting domain on "." function getSecondLevelDomain(hostArray) { // scenarios: // ["www", "xradiograph", "com"] // ["www", "cs", "uofs", "edu"] // ["localhost"] // as it exists, code only works for the first two scenarios; // fails for third // TODO: raise a ruckus on unexpected data? // TODO: oh, yeah -- clean this up. ugh. var mainDomain; return hostArray[hostArray.length-2].toLowerCase(); } // eg "com" "org" "to" function getTLD(url) { // return the top-level domain of supplied url // expects an array derived from splitting domain on "." return url[url.length-1].toLowerCase(); } function $id(id) { var elem; try { elem = document.getElementById(id); } catch(e) {} return elem; } // wrapper for getFirstResult - like the FireBug command-line, except only a single elem. returned function $x1(expr) { return getFirstResult(expr, document); } // wrapper for getFirstResult - like the FireBug command-line, except only a single elem. returned function $x(expr) { return getXpathResult(expr, document); } // Returns null if expr didn't match anything function getFirstResult(expr, node){ // if no node provided, default to document if (!node) {node = document;} var result = document.evaluate(expr, node, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); return result.singleNodeValue; } // Returns null if expr didn't match anything function getXpathResult(expr, node){ // if no node provided, default to document if (!node) {node = document;} var result = document.evaluate(expr, node, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); return result; } // "creates" elemenent with supplied attributes function makeElement(type, attributes){ var node = document.createElement(type); for (var attr in attributes) if (attributes.hasOwnProperty(attr)){ node.setAttribute(attr, attributes[attr]); } return node; } function addHeaderCode(element, type, code, attributes) { var custElm; custElm = makeElement(element, attributes); if (type) {custElm.type = type;} custElm.innerHTML = code; document.getElementsByTagName('head')[0].appendChild(custElm); } // TODO: it's an action with a noun's name. ouch. function errorHandler(error, site) { if (!site) { site = ""; } var msg = "SkipScreen - " + site + " generated error:\n\n" + error; if (enabled("errordisplay")) { alert(msg); } logIt(msg); // http://www.xs4all.nl/~jlpoutre/BoT/Greasemonkey/gm_openintab.html // open messages in a new tab for info.... //GM_openInTab("data:text/plain;charset=UTF-8," + encodeURI(smsg); } function prominence(msg) { // create main div var prom = makeElement('div', {id: "prom", 'class': 'prom' }); var anchor = makeElement('a', {href: "#", title: "close (does not cancel download)", 'class': 'closer' }); anchor.innerHTML = "x"; var remover = function () {document.getElementById('prom').style.display = "none"; }; anchor.addEventListener('click', remover, false); var cont = makeElement("div", {'id': 'prom-content'}); cont.innerHTML = msg; prom.appendChild(anchor); prom.appendChild(cont); // Append Divs var objBody = document.getElementsByTagName("body")[0]; // exit if no body -- some weird errors... if (objBody) {objBody.appendChild(prom);} // if jquery Drag-n-Resize exists, use it if (typeof jQuery != 'undefined') $('#prom').jqDrag(); var prominentCSS = '.prom {' + 'position: fixed;' + 'z-index: 9999999;' + 'top: 50%;' + 'left: 50%;' + 'margin-top: -100px;' + 'margin-left: -150px;' + 'width: 300px;' + 'height: 200px;' + 'background: #C8FFCA;' + 'opacity: 0.9;' + 'color: #008000;' + 'border: 10px solid #349534;' + 'text-align: center;' + 'font-size: 14px;' + 'font-family: verdana;' + '}' + '.prom-auto {' + 'color: #349534;' + 'font-weight: bold;' + '}' + '.prom-host {' + 'color: red;' + '}' + '#prom-content {' + 'padding: 10px;' + '}' + '.prom p {' + 'margin: 0;' + 'padding: 5px 10px; ' + 'text-align: center;' + '}\n' + '.prom a {' + 'color: #000;' + '}\n' + '.prom a.closer {' + 'float: right;' + 'text-decoration: none;' + 'font-weight: bold;' + 'color: #fff;' + 'background-color: #000;' + 'border-left: 1px solid #333;' + 'border-bottom: 1px solid #333;' + 'line-height: 9px;' + 'padding: 0 2px 1px;' + 'margin-left: 2px; }'; addHeaderCode('style', 'text/css', prominentCSS); } // end prominence // TODO: optionally use pre-exisiting timer... eg, don't double-display function genericWaiter(seconds, gwHostStr, endFunction) { var msg = "<p class='prom-host'>"+ gwHostStr + " is making you wait.</p>" + "<p class='prom-auto'>SkipScreen will automatically retry when the timer finishes.</p>" + "<p id='remaining'>Preparing to skip</p>"; prominence(msg); // NOTE: as this is added to the page // TOOLS and $id needed to be added to the namespace, as well... var waiter = setInterval( function() { --seconds; if (seconds <= 0) { clearInterval(waiter); document.title = "{SS} Download started!"; var r = $id("remaining"); if (r) r.innerHTML = "<p style='color: blue'>Download started!</p>"; endFunction(); } else { var msg = TOOLS.formatSeconds(seconds) + " remaining"; document.title = "{SS} "+ msg + " (" + gwHostStr + ")"; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } } , TOOLS.ONE_SECOND ); } // end genericWaiter /* ******************************************* Client functions ******************************************* */ // added Nov 2009 function filestube() { //var dl = $x('//tr/td[1]/a'); var dl = $x('//div[3]/table/tbody/tr/td[1]/a'); // aaargh, THIS version never happens.... if (dl && dl.href) { document.location.href = dl.href; return; } if (dl && (dl.snapshotLength > 0)) { // if length is 1, use the replace location method (single-part download) var length = dl.snapshotLength; if (length == 1) { document.location.href = dl.snapshotItem(0).href; } else { if (!enabled("filestube_multi_active")) length = 1; //limit to the first entry for CPU usage throttle // multi-part files, open in sep tabs for (var i = 0; i < length; i++) { var loc = dl.snapshotItem(i).href; if (loc) { //alert(i + "\n" + loc); GM_openInTab(loc); } } } // now, we're left with an orphan window. dang. } // filestube doesn't have a ShareScreen ending, becuase it's an intermediary.... } // added Sept 2009 function netload() { return; // disabled for 0.3.20091108 release unsafeWindow.popunder = {}; var postC = $x1("//div[@id='changeDiv']/b"); if (postC && postC.innerHTML && (postC.innerHTML.indexOf("We will prepare your download") > -1) ) { var wait = 20; // default var s = $x1("//div[@id='changeDiv']/script"); if (s && s.innerHTML & s.innerHTML.indexOf("countdown(") > -1) { //wait = (parseInt(s.innerHTML.match(/countdown\((\d+),/)[1], 10) / 100 ) + TOOLS.randomOffset(10); wait = 25; } var endFunction = function () { // post-captcha alert("here"); var pcLink = $x1("id('download')/div/a"); if (pcLink) { location.href = pcLink.href; } }; genericWaiter(wait, twoLD, endFunction); return; } var downloadLink = getFirstResult("//div[@class='dl_first_btn2']/div/a"); if (downloadLink) { // pre-captch var newL = downloadLink.href; location.href = newL; // TODO: the next is an inaccurate condition -- it is true on _several_ pages // additionally, the timers are not in synch. } else if (unsafeWindow.countdown ) { //captcha -- and other pages var pMsg = "<div style='background-color: white;'><p style='color:red'>NetLoad is making you wait.</p>" + "<p style='color:green'><strong>SkipScreen should position you in the captcha-field when the timer finishes.</strong></p>" + "</div>"; prominence(pMsg); var seconds = 38; var waiter = setInterval( function() { seconds--; if (seconds <= 0) { clearInterval(waiter); var c = $x1("//input[@class='Download_Captcha']"); if (c) c.focus(); var prom = $id("prom"); if (prom) prom.style.display = "none"; } } , 1000 ); } } function fourshared () { var site = "4Shared"; unsafeWindow.fcwait = function() {}; var downloadNow = $x1("//a[contains(.,'Download Now')]"); var clickHereToDownload = $x1("id('divDLStart')/a"); //check if at stage 1 if (downloadNow && downloadNow.href) { if (disabled("fourshared_audio_")) { // if audio _skipping_ is disabled var text = $id("contact-message"); if (text) { text.innerHTML = "Audio Preview enabled; click 'Download Now' to download (or goto Options to skip)."; } } else { //goto stage 2 location.href = downloadNow.href; } } // handle stage2 if (clickHereToDownload) { // TODO: better try/catch block? not purely safe, these.... try { TOOLS.incrSkipCount(); // optimisitc! var cntr = document.createElement("script"); document.body.appendChild(cntr).innerHTML = "function getCount() { return " + TOOLS.getSkipCount() + ";}"; var dlLink = $x1("id('divDLStart')/a").href; var seconds = parseInt($id("downloadDelayTimeSec").innerHTML); var hostMessage = "4Shared requires you to wait"; var endFunction = function(){ new share().show(); location.href = dlLink; }; genericWaiter(seconds, hostMessage, endFunction); } catch (e) { errorHandler(e, twoLD); } } } // end fourshared function storage () { //gets rid of popup but not needed with script unsafeWindow.popunder = function() {}; // pass in STATE and LINK function parseJSONObj(state, countdown, link){ var tp = 'ct'; function skipstore(time) { var ssMsg = "<p style='color:red'>STORAGE.to is making you wait.</p>" + "<p style='color:green'><strong>SkipScreen will automatically retry when the timer finishes.</strong></p>" + "<p id='remaining'>Preparing to skip</p>"; prominence(ssMsg); TOOLS.incrSkipCount(); // optimistic! var cntr = document.createElement("script"); document.body.appendChild(cntr).innerHTML = "function getCount() { return " + TOOLS.getSkipCount() + ";}"; // TODO: this method still needs a way to accurately increment the skipCount addSharingScripts(); var seconds = time; var waiter = setInterval( function() { --seconds; if (seconds <= 0) { clearInterval(waiter); var mg = "Preparing to Skip!"; var rem = $id("remaining"); if (rem) rem.innerHTML = mg; document.title = mg; new share().show(); location.href = link; } else { var msg = TOOLS.formatSeconds(seconds) + " remaining."; document.title = "{SS} " + msg; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } } , 1000 ); // end waiter } var time; if (state == 'failed') { // retry in 5 minutes time = (60 * 5) + TOOLS.randomOffset(60); skipstore(time); } else if ( (state == 'wait') || (countdown > 0) ) { var offset = TOOLS.randomOffset(10); time = parseInt(countdown,10) + offset; skipstore(time); } else if (state == 'ok') { new share().show(); location.href = link; } } function getJSONObj(){ var linkid = location.href.substring(26,34); GM_xmlhttpRequest({ method: "GET", url: "http://www.storage.to/getlink/" + linkid + "/", headers: { "User-Agent": "Mozilla/5.0", // Recommend using navigator.userAgent when possible "Accept": "text/xml" }, onreadystatechange: function(req) { if (req.readyState != 4) return; if (req.status != 200) return; //req.responseText will be something like //new Object({ 'state' : 'ok', // 'countdown' : 60, // 'link' : 'http://80.95.157.7/558205e50d0ba3f14d81f7c3637ad3f92cb20cc2/Cornelius - Wataridori 2.mp3', // 'linkid' : 'GehTRoYm' }); var state, countdown, link; var res = req.responseText.match(/'state' : '(.*?)',.*?'countdown' : (\d+).*?'link' : '(.*?)',/); if (res.length == 4) { state = res[1]; countdown = res[2]; link = res[3]; } parseJSONObj(state,countdown,link); } }); } // start it up getJSONObj(); } // end storage.to function uploaded () { var submit = getFirstResult("//input[@id='download_submit']"); if (submit) { try { unsafeWindow.update = function () {}; submit.disabled = false; submit.value = "SkipScreen is working"; var form = getFirstResult("//tr[1]/td/form"); new share().show(); if (form) {form.submit();} return; } catch (e) { errorHandler(e, twoLD); } } var limit = getFirstResult("//center/div"); // 1-hour delay ? if (limit && limit.innerHTML && limit.innerHTML.indexOf("your order. (Or wait") > -1 ) { try { // check for # of mins... var wait = 0; var time = 0; var seconds = 0; var minute = limit.textContent.match(/(\d+) minute/); if (minute && (minute.length == 2) ) { time = parseInt(minute[1], 10); seconds = TOOLS.minutesToSeconds(time); } if (!minute) { var secs = limit.textContent.match(/(\d+) second/); if (secs && (secs.length == 2) ) { time = parseInt(secs[1], 10); seconds = TOOLS.minutesToSeconds(time); } } var allText = getFirstResult("//center/div"); var ssMsg = "<p style='color:red'>Uploaded.to is making you wait.</p>" + "<p><strong style='color:green'>SkipScreen will automatically retry when the timer finishes.</strong></p>" + "<p><em>Check out <a href='http://www.SkipScreen.com' target='_blank'>SkipScreen.com</a> " + "and search for something new, while we wait.</em></p>" + "<p id='remaining'>Waiting for you!</p>"; prominence(ssMsg); // handle thing, with timer addSharingScripts(); var waiter = setInterval( function () { --seconds; if (seconds <= 0) { clearInterval(waiter); document.location.href = document.location.href.replace("?view=error_traffic_exceeded_free&id=", "file\/"); } else { var msg = TOOLS.formatSeconds(seconds) + " remaining"; document.title = "{SS} " + msg; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } } , TOOLS.ONE_SECOND ) ; } catch (e) { errorHandler(e, twoLD); } } // already downloading? if (limit && limit.innerHTML.indexOf("already downloading a file") > -1 ) { try { var allText = getFirstResult("//center/div"); var msg = "<p style='color:red'>Uploaded.to is making you wait.</p>" + "<p style='color:green'>SkipScreen will automatically retry when the timer finishes.</p>" + "<p><span id='remaining'></span></p>"; prominence(msg); addSharingScripts(); // TODO: add reload period to the options var seconds = 120 + TOOLS.randomOffset(20); var waiter = setInterval( function () { --seconds; if (seconds <= 0) { clearInterval(waiter); document.location.href = document.location.href.replace(/\?view=.*&id_b=/, "file/"); } else { var msg = TOOLS.formatSeconds(seconds) + " remaining"; document.title = "{SS} " + msg; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } },TOOLS.ONE_SECOND ) ; } catch (e) { errorHandler(e, twoLD); } } } // end uploaded function hotfile () { // these vars seem named in reverse, since we parse dlText for the timer-length // but they are consistent with the id tags, set by hotfile. whatcanyado.... //var dlTimer = $id("dwltmr"); var downLoadLink = getFirstResult("//td/h3/a"); var freeButton = getFirstResult("//tr/td[3]/input"); var seconds = 0; var time = 0; var useSkipScreenTimer = true; // TODO: not working (as of ?? hotfile works as of August30, 2009) if (freeButton) { unsafeWindow.starttimer(); } var dlTimer = getFirstResult("//h3[@id='dwltxt']/text()"); // reached limit var dlText = getFirstResult("//h3[@id='dwltmr']/span/text()"); // normal wait // the idea is to get whichever one is active (if either) // and then treat them the same... var informer; if (dlText) { informer = dlText.data; } else if (dlTimer) { informer = dlTimer.data; } if ( informer ) { var minutes = informer.match(/(\d+) minute/); if (minutes && (minutes.length == 2)) { time = parseInt(minutes[1],10); seconds = TOOLS.minutesToSeconds(time); } var secs = informer.match(/(\d+) second/); if (secs && (secs.length == 2)) { time = parseInt(secs[1],10); seconds = time; // hotfile updates their own timer // put two on-screen, and they're out of synch; ugly useSkipScreenTimer = false; } var ssMsg = "<p style='color:red'>HotFile.com is making you wait.</p>" + "<p style='color:green'><strong>SkipScreen will automatically retry when the timer finishes.</strong></p>" + "<p id='remaining'>Working...</p>"; // blank, becuase there is _already_ a timer on-screen.... prominence(ssMsg); var waiter = setInterval( function () { seconds--; if (seconds <= 0) { clearInterval(waiter); var rem = $id("remaining"); if (rem) rem.innerHTML = "If your download doesn't proceed, please try again."; document.location = document.location; var sub = document.forms.f; if (sub) sub.submit(); } else { var msg = TOOLS.formatSeconds(seconds) + " remaining to wait"; document.title = "{SS} " + msg; if (useSkipScreenTimer) { // double-declaration in same scope... var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } } } , TOOLS.ONE_SECOND) ; } // this was the attempt to bypass the initial wait-period; was only working in the US, not internationally // if (freeButton && unsafeWindow.starttimer) { // getFirstResult('//input[@name="tm"]').value = "1245203148" ; // getFirstResult('//input[@name="waithash"]').value = "59a20bf8ffeeaa58a936237db169f35501a2227a"; // getFirstResult('//input[@name="tmhash"]').value = "81c710fba459fa7e5d350fdb693ff7751fa0ee6b"; // document.forms.namedItem("f").submit(); // return; // } if (downLoadLink) { new share().show(); document.location.href = downLoadLink; } } // end hotfiles // should only be in here if the path is exactly 6-chars function digg () { var dFrame = $id("diggiFrame"); if (dFrame) { document.location.href = dFrame.src; } else { var ct = $id("skipscreen"); if (ct) { var timer = setInterval( function () { clearInterval(timer); ct.style.display = "none"; }, 5000); } } } // see megaupload.js -enternal file function limelinx () { // there are (at least) three main pages we're clicking on.... logIt("limelink: entrance"); var xpath = "//li[@id='DownloadLI']/a"; var urlLink = getFirstResult(xpath, document); if (urlLink) { try { logIt("limelinx: p1"); document.location = urlLink.href; } catch(e) { errorHandler(e, twoLD); } return; } // second-phase xpath = "/html/body/div[2]/p/a[@id='DownloadButton']"; //xpath = "/p/a[@id='DownloadButton']"; urlLink = getFirstResult(xpath,document); if (urlLink) { logIt("limelinx: second-phase"); document.location = urlLink.href; //return; } // I hope you're seeing a pattern, here... // third-phase xpath = "//a[@id='AdBriteSkipThisAd']"; urlLink = getFirstResult(xpath,document); if (urlLink) { logIt("limelinx: p3 intermission"); // this needs to be a click.... document.ADBRITE.INTERMISSION.hide_intermission(); //document.location = urlLink.href; } // fourth-phase xpath = "//p[@id='CountDownText']/a"; xpath = "/html/body/div[@class='Content' and position()=2]/p[@id='CountDownText']/a"; urlLink = getFirstResult(xpath,document); if (urlLink) { logIt("limelinx: p4 countdown"); document.location = urlLink.href; } } function divshare () { // TODO: this is weird, it should be AT THE END, not the begininng... //new share().show(); // there are three main pages we're clicking on.... var xpath = "//div[2]/span/a[@class='action']"; var urlLink = getFirstResult(xpath, document); if (urlLink) { try { document.location = urlLink.href; } catch(e) { errorHandler(e, twoLD); } return; } // second-phase xpath = "//tr[2]/td/a[@class='action']"; urlLink = getFirstResult(xpath,document); if (urlLink) { document.location = urlLink.href; return; } // I hope you're seeing a pattern, here... // third-phase xpath = "//tr/td[1]/div[1]/span[@class='icon_span']/a[@class='action']"; // xpath = "//div/center[2]/div[1]/span[@class='icon_span']/a[@class='action']"; urlLink = getFirstResult(xpath,document); if (urlLink) { new share().show(); document.location = urlLink.href; } } function linkbucks () { document.cookie="alerted=yes"; var xpath = "//div[@id='lb_wrap']/a[2]"; var urlLink = getFirstResult(xpath, document); if (urlLink) { try { document.location = urlLink.href; } catch(e) { errorHandler(e, twoLD); } } } function sharebee () { // sharebee offers no direct downloads, so never displays the share-flag // this is untested, as I'm not getting these ads anymore.... // they so seldom appear // leave it in, in case it shows up.... var urlLink = $id("AdBriteSkipThisAd"); if (urlLink) { // we're in an interstitial ad-page try { unsafeWindow.ADBRITE.INTERMISSION.hide_intermission(); } catch(e) { errorHandler(e, twoLD); } return; } // returns all the randomly-ordered links var sb_xpath = "//table[@class='links']/tbody/tr/td/div/a"; var sb_table = document.evaluate(sb_xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); if (sb_table) { for (var i=0; i < sb_table.snapshotLength; i++) { var target = sb_table.snapshotItem(i); var url = domainToArray(target.href); // select a known -- and working -- handler // not prioritized -- just in order provided // TODO: test links first, to see if they exist? // or (easier) allow user to select priority.... var dom = getSecondLevelDomain(url); switch (dom) { case 'depositfiles' : case 'zshare' : document.location = target.href; break; } } } } function zshare (aPath){ if (aPath[1]=='audio') { // audio is handled differently, as it has a built-in player (for previews) // and maybe people want to listen, y'know? if (disabled("zshare_audio_")) { // if the _skipping_ is disabled var text = $id("contact-message"); if (text) {text.innerHTML = "Audio Preview enabled; click \"Continue Skipping\" to download.";} // TODO: make this a clickable on-screen display var onward = getFirstResult("//tbody/tr[1]/td/div/table/tbody/tr/td[2]/a"); if (onward) {onward.innerHTML = "<span style='color:green'>Continue Skipping!</span>";} } else { var audio_xpath = "//div/table/tbody/tr/td[2]/a"; var urlLink = getFirstResult(audio_xpath, document); if (!urlLink) {return;} // either not audio, or not found document.location = urlLink.href; } } else { // we're not dealing with audio var dl_element = $id('download'); if (dl_element && (dl_element.type != 'hidden') ) {// this is our download page // make a link appear "early".... // var easy_link = document.createElement("a"); // easy_link.setAttribute("href", unsafeWindow.link); // also stored as array link_enc (single-chars) // easy_link.innerHTML = "<center><strong><span style='color:green'>zShare download link!</span></strong></center>"; // var daddy = dl_element.parentNode; // daddy.appendChild(easy_link); // kill the timer //unsafeWindow.time = 0; var seconds = unsafeWindow.time; var endFunction = function(){ new share().show(); location.href = unsafeWindow.link; }; genericWaiter(seconds, twoLD, endFunction); // new share().show(); // document.location = unsafeWindow.link; } else if (dl_element) { // page that links to download page var form = document.forms.namedItem("form1"); form.submit(); } } } // somewhat working, but iffy function sendspace() { // link, etc. is at bottom of screen.... unsafeWindow.scrollTo(0,9999999); logIt("sendspace"); // link will not appear until ads are loaded... var downloadLink = $id('downlink'); if (downloadLink) { document.location = downloadLink.href; } else { addSharingScripts(); var freedom = function () { var timer = setInterval( function () { if (link_updated == 1) { clearInterval(timer); var downloadLink = document.getElementById('downlink'); if (downloadLink) { new share().show(); document.location = downloadLink.href; } } }, 1000); }; var noHassler = document.createElement("script"); document.body.appendChild(noHassler).innerHTML = "(" + freedom + ")()"; } } function mediafire () { var loc = document.location.href; if (loc.indexOf("mediafire.com/download.php") > -1) { document.location.href = loc.replace(/download\.php/, ""); return; } // http://www.mediafire.com/file/4tjxjfz1tyw if (loc.indexOf("mediafire.com/file/") > -1) { document.location.href = loc.replace(/file\//, "?"); return; } // changed on Nov 2, 2009 var mf_xpath = "//div[@class='download_link' and not(@id='download_link')]/a"; //var downloadLink = getFirstResult(mf_xpath, document); var downloadLink; var dl = $(".download_link[style*=block] > a"); // first use of jQuery selectors..... if (dl && dl[0] && dl[0].href) downloadLink = dl[0]; if (downloadLink) { var opt_xpath = "//input[@id='p_ct_checkbox']"; var checkbox_present = getFirstResult(opt_xpath, document); if (checkbox_present) { addSharingScripts(); TOOLS.incrSkipCount(); var cntr = document.createElement("script"); document.body.appendChild(cntr).innerHTML = "function getCount() { return " + TOOLS.getSkipCount() + ";}"; // the name "freedom" is an artifact of the pre-release product name "HassleFree" function freedom() { prominence('Your SkipScreen download is starting...'); // weird variables names match code on the page p_ct_link.href = p_ct_dl_url; p_ct_link.target = ''; new share().soloShow(); document.location.href = p_ct_dl_url; } var noHassler = document.createElement("script"); document.body.appendChild(noHassler).innerHTML = "(" + freedom + ")()"; } else { // no checkbox present prominence('Your SkipScreen download is starting...'); new share().show(); document.location = downloadLink.href; } } // end downloadLink found } // end MediaFire function link_protector () { var xpath = "//form/input"; var button = getFirstResult(xpath, document); if (button) { try { var content = button.wrappedJSObject.onclick; if (content) { var reg = /.*"(.*)".*/; var parse = reg.exec(content); if (parse) { var newLink = parse[1]; document.location = newLink; } } else { var form = getFirstResult("//form"); if (form) { form.submit(); } } // NOTE: there is no Share, because link-protector is an intermediary to other sites } catch(e) { errorHandler(e, twoLD); } } } function depositfiles () { // handles mp3s differently than other files var dfSubmit = function () { try { new share().show(); link.submit(); } catch(e) { errorHandler(e, twoLD); } }; var xpath = "//td[2]/form"; var link = getFirstResult(xpath, document); if (link) { // mp3-type download dfSubmit(); return; } xpath = "//div[@id='download_url']/form"; link = getFirstResult(xpath, document); if (link) { dfSubmit(); return; } var already1 = getFirstResult("//body/p/text()"); var already2 = getFirstResult("//div/p[1]/strong", document); var already = ( (already1 && already1.indexOf('You are trying to download') > -1) || (already2 && already2.innerHTML.indexOf('already downloading') > -1) ); if (already) { var concurrent = (already1 ? already1 : already2) ; var ssMsg = "<p style='color:red'>DepositFiles is making you wait.</p>" + "<p style='color:green'><strong>SkipScreen will automatically retry when the timer finishes.</strong></p>" + "<p id='remaining'>Preparing to skip</p>"; //concurrent.appendChild(ssMsg); prominence(ssMsg); // wait for a minute (+- random amount), then try again.... var seconds = 60 + TOOLS.randomOffset(20); var waiter = setInterval( function () { --seconds; if (seconds <= 0) { clearInterval(waiter); var rem = $id("remaining"); if (rem) rem.innerHTML = "If your download doesn't start, please try again."; document.location = document.location; } else { var msg = TOOLS.formatSeconds(seconds) + " remaining until automatic retry."; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } }, TOOLS.ONE_SECOND ); return; } var limit = getFirstResult("//div[@class='ipbg']/strong", document); if (limit && limit.innerHTML && limit.innerHTML.indexOf("used up your limit") > -1) { // may make us wait for minutes OR seconds... var time = 0; var seconds = 0; var minute = limit.innerHTML.match(/(\d+) minute/); if (minute && (minute.length == 2) ) { time = parseInt(minute[1],10); seconds = TOOLS.minutesToSeconds(time); } if (! minute) { var secs = limit.innerHTML.match(/(\d+) second/); if (secs && (secs.length == 2)) { time = parseInt(secs[1],10); seconds = time; } } var f = "<p style='color:red'>DepositFiles is making you wait.</p>" + "<p style='color:green'><strong>SkipScreen will automatically retry when the timer finishes.</strong></p>" + "<p id='remaining'>Preparing to skip</p>"; //limit.appendChild(f); prominence(f); var waiter = setInterval( function () { --seconds; if (seconds <= 0) { clearInterval(waiter); var rem = $id("remaining"); if (rem) rem.innerHTML = "Preparing to Skip!"; document.location = document.location; } else { var msg = TOOLS.formatSeconds(seconds) + " remaining to wait"; document.title = "{SS} " + msg; var rem = $id("remaining"); if (rem) rem.innerHTML = msg; } } , 1000 ) ; } // end limit checks } // end depositfiles function rapidshare () { // trap for iframe issues // if (! document.body) return; // similar code, drills directly to the button.... // var freeBtn = getFirstResult("//input[@value='Free user']", document); // if(freeBtn) freeBtn.click(); // auto-choose free button var freeForm = document.forms.namedItem("ff"); // is it accident, or design that selects "Free User" ? if (freeForm) { freeForm.submit(); return; } var form = document.forms.namedItem("dlf"); if (form) { new share().show(); form.submit(); return; } // if the above didn't work, you're gonna hafta wait..... addSharingScripts(); var ssBanner = $id("contactText"); var ssOrig; if (ssBanner) { ssOrig = ssBanner.innerHTML; ssBanner.innerHTML = "SkipScreen will download your file as soon as it is available!"; } var wait = false; // grab filename for timer-display var fileName = location.pathname.split('/'); fileName = fileName[fileName.length-1]; var ssMsg = "<p style='color:red'>RapidShare is making you wait.</p>" + "<span style='color: green;'><strong>SkipScreen will automatically retry when the timer finishes.</strong></span>" + "<h2><span id='remaining'></span></h2>"; // simple wait < 1 minute // TODO: if it's less than 1 minute, and the regex is looking for the word "minute"... // it won't find it? I don't think this _ever_ succeeds var verif = getFirstResult("//p[2]/b", document); if (verif && verif.innerHTML && verif.innerHTML.indexOf("minutes")> -1) { wait = (parseInt(verif.innerHTML.match(/(\d+) minutes/)[1], 10) * 60) + TOOLS.randomOffset(10); prominence(ssMsg); } // download limit has been reached; ~15 minutes wait if (!wait) { var limitWait = getFirstResult("//p[2]/text()", document); // TODO: hrrm.... what about... 1 minute to go? if (limitWait && limitWait.data && limitWait.data.indexOf("minutes") > -1 ) { wait = (parseInt(limitWait.data.match(/(\d+) minutes/)[1], 10) * 60) + TOOLS.randomOffset(10); prominence(ssMsg); } } // end !wait (15 minutes) if (!wait) { // are we already downloading in another tab? var already = getFirstResult("//p[2]/text()", document); if (already && already.data && already.data.indexOf("already downloading") > -1) { // wait (hopefully, download will be complete), and try again // randomize the waiting period, slightly to "hide" automation... wait = (2 * 60) + TOOLS.randomOffset(30) ; prominence(ssMsg); } } // NOTE: will probably have to wait 15 minutes, at that point... but now it is automated... if (!wait) { var expired = getFirstResult("//div/p[2]", document); if (expired && expired.innerHTML && expired.innerHTML.indexOf("session has expired") > -1) { var fresher = getFirstResult("//div[2]/div/p[2]/a", document); if (fresher) {document.location = fresher.href;} } } if (!wait) { var noSlots = getFirstResult("//div/p[3]/text()", document); if (noSlots && noSlots.data && noSlots.data.indexOf("no more download slots") > -1) { // wait (hopefully, download will be complete), and try again // randomize the waiting period, slightly to "hide" automation... wait = (2 * 60) + TOOLS.randomOffset(30) ; prominence(ssMsg); } } if (wait && (wait !== 0) ) { var seconds = wait; var waiter = setInterval( function() { --seconds; if (seconds <= 0) { clearInterval(waiter); var subst = document.createElement("form"); var inp = document.createElement("input"); inp.name = "dl.start"; inp.value = "Free"; subst.action = location.href; subst.method = "post"; subst.appendChild(inp); document.body.appendChild(subst); subst.submit(); } else { var msg = TOOLS.formatSeconds(seconds) + " remaining"; document.title = "{SS} " + msg; var remain = $id("remaining"); if (remain) remain.innerHTML = msg; } } , 1000 ) ; } else { // TODO: Skip if timer = 0 ?? var rsScript = getFirstResult("//div[@id='inhaltbox']/script",document); if (rsScript) { var mins = rsScript.innerHTML.match(/c=(\d+)/); if (mins) { wait = parseInt(mins[1], 10); } } else { var warning = $id("contact-message"); if (warning) warning.innerHTML = "couldn't find skippable codes; click to download."; return; // quit entirely, because the file is not here (or some other error) } // now that we've captured the wait, set count to 0 unsafeWindow.c = 0; if (unsafeWindow.fc) {unsafeWindow.fc = function () {return;};} // don't need the built-timer actions prominence(ssMsg); function smoothSailing() { var TOOLS = new SKIPSCREEN_TOOLS(); // Returns null if expr didn't match anything function getFirstResult(expr, node){ // if no node provided, default to document if (!node) {node = document;} var result = document.evaluate(expr, node, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); return result.singleNodeValue; } var $id = function(id) { return document.getElementById(id); }; var timer = setInterval( function() { //start counter wait--; if (wait <= 0) { clearInterval(timer); document.title = "starting download! {SkipScreen}"; var ct = $id("contactText"); if (ct) {ct.innerHTML = 'SkipScreen bugs? Ideas? Screens that need skipping? <a href="http://getsatisfaction.com/skipscreen/">contact us!</a>';} var prom = $id("prom"); if (prom) prom.style.display = "none"; new share().soloShow(); var dlf = getFirstResult("//form[@name='dlf']", document); if (dlf) {dlf.submit();} } else { // display mirror selections if ($id("p1")) $id("p1").style.display = ""; // and hide "download" button var download = getFirstResult("//div[@id='dl']/form/center/input"); if (download) download.style.display = "none"; document.title = "{SS} " + (wait) + " " + fileName; var remain = $id("remaining"); if (remain) remain.innerHTML = wait + " seconds left"; } },1000); } // end smoothSailing TOOLS.incrSkipCount(); var cntr = document.createElement("script"); document.body.appendChild(cntr).innerHTML = "function getCount() { return " + TOOLS.getSkipCount() + ";}"; var wtvr = document.createElement("script"); document.body.appendChild(wtvr).innerHTML = "var wait = " + wait + ";" ; var flvr = document.createElement("script"); document.body.appendChild(flvr).innerHTML = "var fileName = '" + fileName + "';" ; var skipper = document.createElement("script"); document.body.appendChild(skipper).innerHTML = "(" + smoothSailing + ")()"; } // end final else condition } function share () { this.incrCount = function () { var TOOLS = new SKIPSCREEN_TOOLS(); TOOLS.incrSkipCount(); }; this.getCount = function () { return TOOLS.getSkipCount(); }; this.getDate = function () { var dfault = Date(); var first = new Date(GM_getValue("firstskipdate", dfault )); //return first.toLocaleDateString(); // var curr_date = first.getDate(); // var curr_month = first.getMonth(); // curr_month++; // var curr_year = first.getFullYear(); // return "" + curr_year + "/" + curr_month + "/" + curr_date; return this.formatDate(first); }; this.formatDate = function(fdate) { if (!fdate) fdate = new Date(); var curr_date = fdate.getDate(); var curr_month = fdate.getMonth(); curr_month++; var curr_year = fdate.getFullYear(); return "" + curr_year + "/" + curr_month + "/" + curr_date; }; // wrapper used when calling from page-embedded timers this.soloShow = function () { // this.getCount = function() {return ssCount;}; // TODO: cookie-based this.getCount = function() { if (typeof getCount == 'undefined') { return 2; } else { return getCount(); } }; // TODO: cookie-based this.incrCount = function() {return;}; // TODO: cookie-basedthis.incrCount = function() { // this.getDate = function() { return new Date().toLocaleDateString(); }; this.getDate = function() { return this.formatDate(); }; this.show(); }; this.show = function() { if (disabled("sharescreen")) {return;} addShareStyle(); // promo-rotator iFrame source //var ssResource = 'http://www.SkipScreen.com/resources/ss-inside.html'; var ssResource = 'http://www.SkipScreen.com/search/ss-inside.html?skipper'; this.incrCount(); var count = this.getCount(); var shareText = makeElement('div', {id: 'SS-Share', style: 'display:none'} ); shareText.innerHTML = ' <div id="top-bar">' + ' <div id="top-bar-right">' + ' <a href="http://getsatisfaction.com/skipscreen/">Bugs? Suggestions?</a>' + ' </div>' + ' <div id="top-bar-left">' + ' <a href="#" id="close-box">← Close post-download</a>' + ' </div>' + ' <div id="top-bar-center">' + ' <strong><a href="http://www.skipscreen.com">SkipScreen</a></strong>' + ' has helped download more than ' + count + ' files since ' + this.getDate() + ' </div>' + ' </div>' + ' <div id="mainContent">' + ' <div style="clear: both;"></div>' + ' <div id="bottom-section">' + ' <div id="rotator">' // + ' <iframe name="ssPromo" id="ssPromo" width="800" height="580" src="' + ssResource + '"' + ' <iframe name="ssPromo" id="ssPromo" width="800" height="680" src="' + ssResource + '"' + ' frameborder="0" scrolling="no"></iframe>' + ' </div>' + ' </div>' + ' </div>' + ' <div id="footer-bar">' + ' psyched about skipscreen?' + ' tell a friend about SkipScreen on ' + '<a href="http://www.facebook.com/sharer.php?u=http://www.SkipScreen.com?t=Iskp that Isht" target="_blank">Facebook</a> ' + 'or <a href="http://twitter.com/home?status=I+use+the+SkipScreen+%23FirefoxExtension+to+speed+my+downloads%3A+http%3A%2F%2Fwww.SkipScreen.com" target="_blank" >Twitter.</a>' + ' </div>' ; document.body.appendChild(shareText); var closeit = function () {document.getElementById('SS-Share').style.display = "none"; document.getElementById("skipscreen").style.display = "block"; }; var cb = document.getElementById("close-box"); if (cb) {cb.addEventListener('click', closeit, false);} setTimeout ( function () { document.getElementById("skipscreen").style.display = "none"; document.getElementById("SS-Share").style.display = "block"; $id('ssPromo').src = ssResource; // refresh to force display } , 500 ); // two seconds averages out to be around the dl time w/ server differences }; // end this.show } //end var share function addShareStyle() { // Append CSS addHeaderCode('style', 'text/css', '#SS-Share {' + 'font-family: helvetica, sans-serif;' + 'font-size: 14px;' + 'background-color: white;' // + 'opacity: 0.9;' + 'margin: 0;' + 'padding: 0;' // + 'position: fixed;' + 'position: absolute;' + 'top: 0;' + 'left: 0;' + 'top: 0;' + 'left: 0;' + 'width: 100%;' + 'height: 780px;' + 'z-index: 9999999;' + '}' + '#top-bar {' + 'width: 100%;' + 'background-color: #393;' + 'color: white;' + 'height: 44px;' + 'line-height: 14px;' + '}' + '#top-bar-left {' + 'float: left;' + 'padding: 15px;' + '}' + '#top-bar-center {' + 'width: 500px;' + 'margin: 0 auto 0 auto;' + 'padding: 15px;' + 'text-align: center;' + '}' + '#top-bar-right {' + 'float: right;' + 'padding: 15px; ' + '}' + '#top-bar a, top-bar a:visited {' + 'color: white;' + '}' + '#mainContent {' + '' + 'width: 650px;' + 'margin: 0px auto 0px auto;' + 'color: #444;' + 'line-height: 1.7em;' + 'position: relative;' + '' + '}' + 'a img {' + 'border: none;' + '}' + 'a, a:visited {' + 'color: #333;' + '}' + '#top-section {' + 'text-align: center;' + 'font-size: 15px;' + 'padding: 40px;' + 'color: #555;' + '}' + '#top-section a, #top-section a:visited {' + 'color: #555;' + '}' + 'h3 {' + 'font-size: 18px;' + 'padding: 0;' + 'margin: 0;' + 'font-weight: normal;' + 'text-align: center;' + 'color: #000;' + '}' + '.small-text {' + 'color: #888;' + 'font-size: 12px;' + '}' + '.small-white {' + 'color: #ded;' + 'font-size: 10px;' + 'padding-top: 7px;' + '}' + 'p {' + 'margin: 0px 0 14px 30px;' + '}' + '#top-left {' + 'margin: 10px 0 0 0px;' + 'font-size: 15px;' + 'width: 220px;' + 'float: left;' + '}' + '.section-topper {' + 'padding: 5px 5px 5px 0px;' + 'line-height: 15px;' + 'font-size: 15px;' + 'color: white;' + '}' + '.section-topper strong {' + 'color: black;' + '}' + 'ul {' + 'margin: 0;' + 'padding: 0;' + 'list-style-type: none;' + '}' + 'li {' + 'padding: 5px;' + 'margin: 0;' + 'line-height: 15px;' + 'color: white;' + '}' + 'li:hover {' + 'color: #333;' + 'background-color: #dfd;' + '}' + 'li a, li a:visited {' + '}' + '#top-middle {' + 'margin: 10px 0 0 20px;' + 'font-size: 13px;' + 'width: 340px;' + 'float: left;' + 'color: #666;' + '}' + '#top-middle a, #top-middle a:visited {' + 'color: #666;' + '}' + 'input {' + 'padding: 3px;' + 'font-size: 13px;' + '}' + '#top-right {' + 'margin: 30px 0 0 0px;' + 'width: 20px;' + 'float: left;' + 'background-color: #fff;' + '}' + '#quotes {' + 'color: #ca2f05;' + '}' + '#bottom-section {' + 'padding: 40px 24px 0 0px;' + 'margin: 0px 0 0px 0;' + 'height: 100%;' + '}' + '#footer-bar {' + 'width: 100%;' + 'background-color: #393;' + 'color: white;' + 'height: 14px;' + 'line-height: 14px;' + 'padding: 15px 0 15px 0;' + 'text-align: center;' + 'margin: 0;' + 'position: absolute;' + 'bottom: 0px;' + '}' + '#footer-bar a, #footer-bar a:visited {' + 'color: white;' + '}' ); } // add all scripts need for running sharing-code directly on page function addSharingScripts () { addHeaderCode('script', null, share, {language: 'javascript' }); addHeaderCode('script', null, prominence, {language: 'javascript' }); addHeaderCode('script', null, SKIPSCREEN_TOOLS, {language: 'javascript' }); addHeaderCode('script', null, $id, { language: 'javascript' }); addHeaderCode('script', null, makeElement, { language: 'javascript' }); addHeaderCode('script', null, addHeaderCode, { language: 'javascript' }); addHeaderCode('script', null, addShareStyle, { language: 'javascript' }); // becuase sharescreen (the post-download page) can be disabled, and the disabled check is GM-only // we need to add the function as a pre-coded check when adding to page context addHeaderCode('script', null, 'function disabled() { return ' + disabled('sharescreen') + '; } ', {language: 'javascript' }); } // put contact-info on managed pages function addContactInfo(optionalMessage) { if (window != top) {return;} logIt("adding contact info: " + document.location); // ensure only one instance added to page (to prevent clone-stacking) var alreadyExists = getFirstResult("//div[@id='skipscreen']", document); if (alreadyExists) {return;} var contactLink = "http://getsatisfaction.com/skipscreen/"; var message = optionalMessage ? optionalMessage : "SkipScreen bugs? Ideas? Screens that need skipping?"; // create main div var contactBody= makeElement('div', {id: "skipscreen", 'class': 'msgbox' }); var anchor = makeElement('a', {href: "#", title: "close SkipScreen info", 'class': 'closer' }); anchor.innerHTML = "x"; var removeContact = function () {document.getElementById('skipscreen').style.display = "none"; }; anchor.addEventListener('click', removeContact, false); var contactText = document.createElement('p'); //'SkipScreen bugs? Ideas? Screens that need skipping? <a href="http://getsatisfaction.com/skipscreen/">contact us!</a>' message = '<span id="contact-message">' + message + '</span>'; contactText.innerHTML = message + " <a href='" + contactLink + "'>contact us!</a>"; contactText.id = 'contactText'; contactBody.appendChild(anchor); contactBody.appendChild(contactText); // Append Divs var objBody = document.getElementsByTagName("body")[0]; // exit if no body -- some weird errors... if (objBody) {objBody.appendChild(contactBody);} // Append CSS var contactCSS = '.msgbox {' + 'position: fixed;' + 'z-index: 9999999;' + 'bottom: 0px;' + 'left: 0px;' + 'background: #C8FFCA;' + 'opacity: 0.8;' + 'color: #008000;' + 'border: 1px solid #349534;' + 'text-align: left;' + 'font-size: 11px;' + 'font-family: verdana;' + 'font-weight: bold; }' + '.msgbox p {' + 'margin: 0;' + 'padding: 5px 10px; ' + 'float: left;' + 'max-width: 97%;' + '}\n' + '.msgbox a {' + 'color: #000;' + '}\n' + '.msgbox a.closer {' + 'float: right;' + 'text-decoration: none;' + 'font-weight: bold;' + 'color: #fff;' + 'background-color: #000;' + 'border-left: 1px solid #333;' + 'border-bottom: 1px solid #333;' + 'line-height: 9px;' + 'padding: 0 2px 1px;' + 'margin-left: 2px; }'; GM_addStyle(contactCSS); } // addContactInfo function start () { TOOLS = new SKIPSCREEN_TOOLS(); var url = "" + document.location; var aDomain = domainToArray(url); twoLD = getSecondLevelDomain(aDomain); logIt("SkipScreen: " + twoLD ); // some servers (linkbucks, for now) fall under the same preference and handler function var maskTwoLD = getMask(twoLD); // basic check activation prefs if (disabled(maskTwoLD)) {return;} addContactInfo(); switch( maskTwoLD ) { case 'depositfiles' : depositfiles () ; break; case 'digg' : digg () ; break; case 'divshare' : divshare () ; break; case 'fourshared' : fourshared () ; break; case 'hotfile' : hotfile () ; break; case 'limelinx' : limelinx () ; break; case 'link-protector' : link_protector () ; break; case 'linkbucks' : linkbucks () ; break; case 'mediafire' : mediafire () ; break; case 'megaupload' : megaupload () ; break; case 'rapidshare' : rapidshare () ; break; case 'sendspace' : sendspace () ; break; case 'sharebee' : sharebee () ; break; case 'storage' : storage () ; break; case 'uploaded' : uploaded () ; break; case 'filestube' : filestube () ; break; case 'zshare' : zshare (pathSplit(location.pathname) ) ; break; case 'netload' : netload () ; break; } } start(); // MUST HAVE TRAILING SEMI-COLONG FOR GM-COMPILER ;